/*
@author https://yunp.top
 */
@file:JsQualifier("createjs")

package createjs

import org.w3c.dom.CanvasRenderingContext2D

open external class Filter {
    val FRAG_SHADER: String
    val VTX_SHADER: String
    var usesContext: Boolean

    fun _applyFilter(imageData: dynamic): Boolean
    fun applyFilter(
        ctx: CanvasRenderingContext2D,
        x: Float,
        y: Float,
        width: Float,
        height: Float,
        targetCtx: CanvasRenderingContext2D = definedExternally,
        targetX: Float = definedExternally,
        targetY: Float = definedExternally
    ): Boolean

    fun clone(): Filter
    fun getBounds(rect: Rectangle = definedExternally): Rectangle
    fun shaderParamSetup(gl: dynamic, stage: StageGL, shaderProgram: dynamic)
}